LC = File1.ListCount ' Get number of files to load
If LC = 0 Then Screen.MousePointer = 0: Exit Sub' If no files in list then exit
LC = LC - 1
IX% = -50
For T = 0 To LC
IX% = IX% + 51: If IX% > 500 Then IY% = IY% + 61: IX% = 1 'This increments the display to show all pictures
CD$ = FN$ + File1.List(T) ' FN$ is directory - This gets the filename to load
Picture2.Picture = LoadPicture(CD$) ' This loads the picture into the temp picture box for resizing
Z% = StretchBlt(Picture1.hdc, IX%, IY%, 50, 50, Picture2.hdc, 0, 0, CInt(Picture2.Width - 2), CInt(Picture2.Height - 2), SRCCOPY) ' This resizes and places the graphic in the main display area
F$ = Left$(File1.List(T), Len(File1.List(T)) - 4)
F$ = " " + F$
Picture1.CurrentX = IX% ' This sets the current horizontal text position
Picture1.CurrentY = IY% + 49 ' This sets the current horizontal text position
Picture1.Print F$ ' This prints the filename under the picture
Next T
Picture1.Refresh ' Update display
Screen.MousePointer = 0 ' Change mouse to normal arrow